#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
#include<math.h>
int main()
{
	char s[101] = {'0'};
	int a[101] = {0};
	int i = 0;
	int j = 0;
	char* ps=s,*pt=s;
	double max = -1, tmp=0;
	int flag=2 ;
	while ((s[i] = getchar()) != '#')
	{
		if (s[i]>='0'&&s[i]<='9')
		{
			flag = 0;
			tmp = 0;
			if (j == 0)
			{
				ps = &s[i];
				pt = &s[i];
			}
			pt++;
			a[j] = s[i]-'0';
			j++;
		}
		else
		{
			if (flag == 0)
			{
				j = 0;
				int len = pt - ps;
				int k, l;
				for (k = len - 1, l = 0; k >= 0; k--, l++)
				{
					tmp = tmp + a[k] * pow(10, l);
					flag = 1;
				}
				if (tmp > max)
					max = tmp;
			}
		}
		i++;
	}
	if (max == -1)
		printf("none\n");
	else
		printf("%.0lf", max);
	return 0;
}
